
package jpapractica;


import java.util.List;
import javax.persistence.*;


@Entity
public class Movie {

    @Id int id;
    String name;
    int yearM;
    String cover;
    String plotkeywords;
    String genero;
    float rating;
    float duration;
    boolean availableForRental;
    boolean availableForPurchase;
    @OneToOne
    Soundtrack soundTrack;
    @ManyToOne
    Director director;
    @ManyToMany
    List<Actor> actores;
    
    public Movie(){}
    public Movie(int id){
        this.id = id; 
    }
    public Movie(int id, String name, int year, String cover, String plotkeywors
                    ,String genero, float rating, float duration, boolean rental,
                    boolean Purchase){
        this.id=id;
        this.name=name;
        this.yearM = year;
        this.cover = cover;
        this.plotkeywords= plotkeywors;
        this.genero = genero;
        this.duration = duration;
        this.availableForRental=rental;
        this.availableForPurchase=Purchase;
    }
        public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getYearM() {
        return yearM;
    }

    public void setYearM(int yearM) {
        this.yearM = yearM;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getPlotkeywords() {
        return plotkeywords;
    }

    public void setPlotkeywords(String plotkeywords) {
        this.plotkeywords = plotkeywords;
    }

    public String getGenero() {
        return genero;
    }

    public void setGenero(String genero) {
        this.genero = genero;
    }

    public float getRating() {
        return rating;
    }

    public void setRating(float rating) {
        this.rating = rating;
    }

    public float getDuration() {
        return duration;
    }

    public void setDuration(float duration) {
        this.duration = duration;
    }

    public boolean isAvailableForRental() {
        return availableForRental;
    }

    public void setAvailableForRental(boolean availableForRental) {
        this.availableForRental = availableForRental;
    }

    public boolean isAvailableForPurchase() {
        return availableForPurchase;
    }

    public void setAvailableForPurchase(boolean availableForPurchase) {
        this.availableForPurchase = availableForPurchase;
    }

    public Soundtrack getSoundTrack() {
        return soundTrack;
    }

    public void setSoundTrack(Soundtrack soundTrack) {
        this.soundTrack = soundTrack;
    }

    public Director getDirector() {
        return director;
    }

    public void setDirector(Director director) {
        this.director = director;
    }

    public List<Actor> getActores() {
        return actores;
    }

    public void setActores(List<Actor> actores) {
        this.actores = actores;
    }
}
